Add charging textures for Bound Tools#1249
Open
Arcaratus wants to merge 5 commits intoWayofTime:1.12from
Arcaratus:obiwanhelpmeplz
Open
Add charging textures for Bound Tools#1249Arcaratus wants to merge 5 commits intoWayofTime:1.12from Arcaratus:obiwanhelpmeplz
Arcaratus wants to merge 5 commits intoWayofTime:1.12from
Arcaratus:obiwanhelpmeplz
Conversation
Also nuked BlockStack and ItemStackWrapper usage in the tools
TehNut
requested changes
Mar 11, 2018
| for (ItemStack stacks : itemDrops) | ||
| drops.add(ItemStackWrapper.getHolder(stacks)); | ||
| NonNullList<ItemStack> itemDrops = NonNullList.create(); | ||
| blockState.getBlock().getDrops(itemDrops, world, blockPos, world.getBlockState(blockPos), fortuneLvl); |
Collaborator
There was a problem hiding this comment.
Why query the world again? Use the state you already have.
| for (ItemStack stacks : itemDrops) | ||
| drops.add(ItemStackWrapper.getHolder(stacks)); | ||
| NonNullList<ItemStack> itemDrops = NonNullList.create(); | ||
| blockState.getBlock().getDrops(itemDrops, world, blockPos, world.getBlockState(blockPos), fortuneLvl); |
|
|
||
| public class ItemBoundTool extends ItemTool implements IBindable, IActivatable { | ||
| public final int chargeTime = 30; | ||
| public final int MAX_CHARGE_TIME = 30; |
| setCreativeTab(BloodMagic.TAB_BM); | ||
| setHarvestLevel(name, 4); | ||
|
|
||
| addPropertyOverride(new ResourceLocation("bloodmagic", "activated"), new IItemPropertyGetter() |
| } | ||
| }); | ||
|
|
||
| addPropertyOverride(new ResourceLocation("bloodmagic", "charge"), new IItemPropertyGetter() |
|
|
||
| while (count >= maxStackSize) { | ||
| world.spawnEntity(new EntityItem(world, posToDrop.getX(), posToDrop.getY(), posToDrop.getZ(), stack.toStack(maxStackSize))); | ||
| ItemStack s = stack.copy(); |
Collaborator
There was a problem hiding this comment.
ItemStack s = ItemHandlerHelper.copyStackWithSize(stack, maxStackSize);| if (count > 0) | ||
| world.spawnEntity(new EntityItem(world, posToDrop.getX(), posToDrop.getY(), posToDrop.getZ(), stack.toStack(count))); | ||
| if (count > 0) { | ||
| ItemStack s = stack.copy(); |
TehNut
approved these changes
Mar 15, 2018
Collaborator
|
Going to wait until I or somebody else has time to create the rest of the textures needed. Don't know when we're building a new release, and I'd rather not ship anything without those. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also nuked BlockStack and ItemStackWrapper usage in the tools.
New textures are needed for the bound tools. (textures not included except for the pick)
Did I do it right this time? :D